package com.hemaapp.yjnh.bean;

import java.io.Serializable;

import org.json.JSONException;
import org.json.JSONObject;

import xtom.frame.XtomObject;
import xtom.frame.exception.DataParseException;

public class ImageItem extends XtomObject implements Serializable {
	private static final long serialVersionUID = 1L;
	
	private String id;// 主键id	
	private String client_id;// 所属用户id	
	private String content;// 图片说明	
	private String imgurl;// 小图地址	
	private String imgurlbig;// 大图地址	
	private String orderby;// 排序规则

    public ImageItem(String imgurl) {
        this.imgurl = imgurl;
    }
	
	public ImageItem(JSONObject jsonObject) throws DataParseException {
        if (jsonObject != null) {
            try {
                id = get(jsonObject, "id");
        		client_id = get(jsonObject, "client_id");
        		content = get(jsonObject, "content");
        		imgurl = get(jsonObject, "imgurl");
        		imgurlbig = get(jsonObject, "imgurlbig");
        		orderby = get(jsonObject, "orderby");

                log_i(toString());
            } catch (JSONException e) {
                throw new DataParseException(e);
            }
        }
    }

    public String getid() {
        return id;
    }
    
    public String getclient_id() {
        return client_id;
    }
    
    public String getcontent() {
        return content;
    }
    
    public String getimgurl() {
        return imgurl;
    }
    
    public String getimgurlbig() {
        return imgurlbig;
    }
    
    public String getorderby() {
        return orderby;
    }
}
